﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Barbar.MapReport.DataSource.Esri {
  /// <summary>
  /// Define type of shape stored either in Shp file (defined either in Shp file header) or in Shp record
  /// </summary>
  public enum ShpShapeType : int {
    /// <summary>
    /// A shape type of 0 indicates a null shape, with no geometric data for the shape. Each
    /// feature type (point, line, polygon, etc.) supports nulls¾it is valid to have points and null
    /// points in the same shapefile. Often null shapes are place holders; they are used during
    /// shapefile creation and are populated with geometric data soon after they are created.
    /// </summary>
    NullShape = 0,
    /// <summary>
    /// A point consists of a pair of double-precision coordinates in the order X,Y.
    /// </summary>
    Point = 1,
    /// <summary>
    /// A PolyLine is an ordered set of vertices that consists of one or more parts. A part is a
    /// connected sequence of two or more points. Parts may or may not be connected to one
    /// another. Parts may or may not intersect one another.
    /// </summary>
    Polyline = 3,
    /// <summary>
    /// A polygon consists of one or more rings. A ring is a connected sequence of four or more
    /// points that form a closed, non-self-intersecting loop. A polygon may contain multiple
    /// outer rings. The order of vertices or orientation for a ring indicates which side of the ring
    /// is the interior of the polygon. The neighborhood to the right of an observer walking along
    /// the ring in vertex order is the neighborhood inside the polygon. Vertices of rings defining
    /// holes in polygons are in a counterclockwise direction. Vertices for a single, ringed
    /// polygon are, therefore, always in clockwise order. The rings of a polygon are referred to
    /// as its parts.
    /// Because this specification does not forbid consecutive points with identical coordinates,
    /// shapefile readers must handle such cases. On the other hand, the degenerate, zero length
    /// or zero area parts that might result are not allowed.
    /// </summary>
    Polygon = 5,
    /// <summary>
    /// A MultiPoint represents a set of points, as follows:
    /// MultiPoint
    /// {
    /// double[4] Box // Bounding Box
    /// int NumPoints // Number of Points
    /// Point[NumPoints] Points // The Points in the Set
    /// }
    /// The Bounding Box is stored in the order Xmin, Ymin, Xmax, Ymax.
    /// </summary>
    Multipoint = 8,
    /// <summary>
    /// A PointZ consists of a triplet of double-precision coordinates in the order X, Y, Z plus a measure.
    /// </summary>
    PointZ = 11,
    /// <summary>
    /// A PolyLineZ consists of one or more parts. A part is a connected sequence of two or
    /// more points. Parts may or may not be connected to one another. Parts may or may not
    /// intersect one another.
    /// </summary>
    PolylineZ = 13,
    /// <summary>
    /// A PolygonZ consists of a number of rings. A ring is a closed, non-self-intersecting loop.
    /// A PolygonZ may contain multiple outer rings. The rings of a PolygonZ are referred to as
    /// its parts.
    /// </summary>
    PolygonZ = 15,
    /// <summary>
    /// A MultiPointZ represents a set of PointZs
    /// </summary>
    MultipointZ = 18,
    /// <summary>
    /// A PointM consists of a pair of double-precision coordinates in the order X, Y, plus a measure M.
    /// </summary>
    PointM = 21,
    /// <summary>
    /// A shapefile PolyLineM consists of one or more parts. A part is a connected sequence of
    /// two or more points. Parts may or may not be connected to one another. Parts may or may
    /// not intersect one another.
    /// </summary>
    PolylineM = 23,
    /// <summary>
    /// A PolygonM consists of a number of rings. A ring is a closed, non-self-intersecting loop.
    /// Note that intersections are calculated in X,Y space, not in X,Y,M space. A PolygonM
    /// may contain multiple outer rings. The rings of a PolygonM are referred to as its parts.
    /// </summary>
    PolygonM = 25,
    /// <summary>
    /// A MultiPointM represents a set of PointMs, as follows
    /// MultiPointM {
    ///   double[4] Box // Bounding Box
    ///   int NumPoints // Number of Points
    ///   Point[NumPoints] Points // The Points in the Set
    ///   double[2] M Range // Bounding Measure Range
    ///   double[NumPoints] M Array // Measures
    /// }
    /// </summary>
    MultipointM = 28,
    /// <summary>
    /// A MultiPatch consists of a number of surface patches. Each surface patch describes a
    /// surface. The surface patches of a MultiPatch are referred to as its parts, and the type of
    /// part controls how the order of vertices of an MultiPatch part is interpreted.
    /// </summary>
    Multipatch = 31
  }
}

